package com.wpen.unit.web.controller.system;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wpen.unit.service.system.NoticeService;
import com.wpen.unit.web.dto.system.NoticeListRequest;
import com.wpen.unit.web.dto.system.NoticeListResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

/**
 * sys_notice维护
 * 
 * @author pg
 *
 */
@Tag(name = "sys_notice模块服务接口")
@RestController
@RequestMapping("/api")
public class NoticeController {
    @Autowired
    private NoticeService noticeService;

    @Operation(summary = "sys_notice-列表查询")
    @PostMapping(value = "/notice/list",produces = MediaType.APPLICATION_JSON_VALUE)
    public NoticeListResponse queryListNotice(@RequestBody @Valid NoticeListRequest noticeListRequest ) {
        return noticeService.queryListNotice(noticeListRequest);
    }

}
